package com.red.star.wechat.data.mappers;

import com.red.star.wechat.data.core.base.MyMapper;
import com.red.star.wechat.data.entity.ImageActivityMall;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author xuquanyu
 * @date 2018/9/27.
 * 裂变图片活动
 */
public interface ImageActivityMallMapper extends MyMapper<ImageActivityMall> {

   List<ImageActivityMall> selectActivityAndMalls(@Param("mallCode") String mallCode, @Param("imageActivityId") Integer imageActivityId);


   @Select(value = "select t.type, t.type_value from t_image_activity_mall t where t.is_delete = 0 and t.image_activity_id = #{imageActivityId}")
   List<ImageActivityMall> selectMallByActivityIdAndType(@Param("imageActivityId") Integer imageActivityId);
}
